<?php
//Boolean
$b = false;		// false
$b = 0;			// false

$b = 1; 	// true
$b = -1;	// true
$b = 5;		// true
$b = TRUE;	// true  (true ot false are case insensitive)




//integer
$i = 43;			//deciaml
$i2 = -456789;	//decimal
//$i3 = 0755;		//Octal
//$i4 = 0xc4e;	//Hexadeciaml

// maximum is 2^31 


// floating number 
$d1 = 0.1;
$d2 = 0.7;

// comparing floating 
if ( ($d1+$d2) == 0.8){						// 0.1+0.7 == 0.8 -> False
	echo "0.1+0.7=d1+d2 ? Yes."; 	
}else {
	echo "0.1+0.7=d1+d2 ? NO.<br>"; 
	echo "0.1+0.7 = ".(0.1+0.7) ."<br>";	
	echo "d1+d2 = ". ($d1+$d2) ."<br>";
	echo "(d1+d2) - 0.8 = " .(($d1+$d2)-0.8) ."<br>";

}
// A solution 
$delta = 1e-6;						
if ( abs($d1+$d2-0.8) < $delta ){		
	echo "abs(d1+d2-0.8) < $delta ? Yes."; 	
}else {
	echo "abs(d1+d2-0.8) < $delta ? NO.<br>"; 
}

//printf("i4 = %s", i4);


?>